/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class CampingLantern {
    static categoryCode = '010010046';

    static categoryName = '露营灯';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return CampingLantern.categoryCode;
    }

    get categoryName() {
        return CampingLantern.categoryName;
    }

    getBrightness(params) {
        return command({
            method: 'getBrightness',
            methodId: 'pDrhxYfI',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getColorTemperature(params) {
        return command({
            method: 'getColorTemperature',
            methodId: 'pGoxubcW',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getMode(params) {
        return command({
            method: 'getMode',
            methodId: 'p1vFkcvz',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pghzVDpE',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setBrightness(params) {
        return command({
            method: 'setBrightness',
            methodId: 'pUPQQGwo',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setColorTemperature(params) {
        return command({
            method: 'setColorTemperature',
            methodId: 'peHyXVxk',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setMode(params) {
        return command({
            method: 'setMode',
            methodId: 'ppAXp3Z1',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'pZgRgxMR',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default CampingLantern;
